package com.github.cyf.entity;

import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.alibaba.excel.annotation.write.style.ContentRowHeight;
import com.alibaba.excel.annotation.write.style.HeadRowHeight;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * @author chenyifan
 * @create 2024-04-05 10:35
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@ContentRowHeight(20)
@HeadRowHeight(40)
@ColumnWidth(10)
public class User {
    @ExcelProperty(value = "id", index = 0)
    private Integer id;

    @ExcelProperty(value = "姓名", index = 1)
    private String name;

    @ExcelProperty(value = "年龄", index = 2)
    private Integer age;

    /**
     * 宽度为20,覆盖上面的宽度10
     */
    @ColumnWidth(20)
    @ExcelProperty(value = "地址", index = 3)
    private String address;
}
